package com.cswnode.VO;

import com.cswnode.Enums.ResponseEnum;

/**
 * @author csw
 * @create 2020/9/22 20:57
 */

public class ResponseVo<T> {
    private Integer status;
    private String msg;
    private T data;

    public ResponseVo(Integer status, String msg) {
        this.status = status;
        this.msg = msg;
}

    public static <T> ResponseVo<T> success(){
        return new ResponseVo<>(ResponseEnum.SUCCESS_LOGIN.getCode(),ResponseEnum.SUCCESS_LOGIN.getMsg());
    }
    public static <T> ResponseVo<T> success(ResponseEnum responseEnum){
        return new ResponseVo<>(responseEnum.getCode(),responseEnum.getMsg());
    }
}
